package com.bing.util;

import com.bing.beans.Person;
import com.bing.beans.Search;
import com.bing.beans.WeiBo;
import com.bing.sina.SinaJdbc;
import com.bing.sina.TaoListener;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by Administrator on 2014/8/29.
 */
public class SearchParse implements Runnable {
    private Logger logger = LoggerFactory.getLogger(SearchParse.class);
    private String html;
    private static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm");

    private SinaJdbc sinaJdbc;
    private TaoListener taoListener;

    private ExcelUtil excelUtil;
    private Search search;

    public SearchParse( String html, SinaJdbc sinaJdbc, Search search ,TaoListener taoListener, ExcelUtil excelUtil) {
        this.html = html;
        this.sinaJdbc = sinaJdbc;
        this.taoListener = taoListener;
        this.excelUtil = excelUtil;
        this.search = search;
    }

    @Override
    public void run() {
        Document doc = Jsoup.parse(html);
        Elements weiBos = doc.select("#plc_main #pl_wb_feedlist .feed_list");
        logger.info("获取微波数：{}", weiBos.size());

    }
}
